package com.joysuch.wwyt.workflow.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * 描述：流程类型枚举<br>
 *
 * @author jingwk<br>
 * @version 1.0 <br>
 * 日期:2021年07月09日 上午10:57:00
 */
public enum WorkFlowProcessTypeEnum {


    DAG(1, "流程"),
    FROM(2, "表单");

    private Integer value;

    private String desc;

    WorkFlowProcessTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public final Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    private static final Map<Integer, WorkFlowProcessTypeEnum> lookup = new HashMap<>();

    static {
        for (WorkFlowProcessTypeEnum e : EnumSet.allOf(WorkFlowProcessTypeEnum.class)) {
            lookup.put(e.value, e);
        }
    }

    public static WorkFlowProcessTypeEnum find(Integer value) {
        return lookup.get(value);
    }
}
